﻿using Dalamud.Configuration;
using Dalamud.Plugin;
using System;

namespace Dalamud_UserUpdate
{
    [Serializable]
    public class Configuration : IPluginConfiguration
    {
        public int Version { get; set; } = 0;
        public bool EnableChatLogging = false;
        public bool 上传失败时发送消息 = false;

        public bool ConfigWindowVisible = false;

        // the below exist just to make saving less cumbersome

        [NonSerialized] private IDalamudPluginInterface? pluginInterface;

        public void Initialize(IDalamudPluginInterface pluginInterface)
        {
            this.pluginInterface = pluginInterface;
        }

        public void Save()
        {
            this.pluginInterface?.SavePluginConfig(this);
        }
    }
}